package com.usian.user.controller;


import com.usian.model.common.dtos.ResponseResult;
import com.usian.model.user.dtos.AuthDto;
import com.usian.user.service.RealNameService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/auth")
public class ApUserRealNameController {

    private final RealNameService userRealnameService;

    public ApUserRealNameController(RealNameService userRealnameService) {
        this.userRealnameService = userRealnameService;
    }

    @PostMapping("/list")
    public ResponseResult loadListByStatus(@RequestBody AuthDto dto){
        return userRealnameService.getRealList(dto);
    }

    @PostMapping("authentication")
    public ResponseResult authentication(@RequestBody AuthDto dto){
        return userRealnameService.authentication(dto);
    }
}
